import Vue from 'vue'
import Vuex from 'vuex'
import userModule from './modules/user'

Vue.use(Vuex)

const state = {
  userId:'',
  competitionId:'',

}

const mutations = {
  SET_USER_ID(state, userId) {
    state.userId = userId;
  },
  SET_COMPETITION_ID(state, competitionId) {
    state.competitionId = competitionId;
  },
}

const actions = {
  // setUserId({ commit }, userId) {
  //   commit('SET_USER_ID', userId);
  // },
  // setCompetitionId({ commit }, competitionId) {
  //   commit('SET_COMPETITION_ID', competitionId);
  // },
}
const getters = {
  
}
export default new Vuex.Store({
  modules: {
    user: userModule
  },
  actions,
  mutations,
  state,
  getters
})